package com.juzi.wopu.domain;

import java.util.ArrayList;
import java.util.List;

// 菜单
public class Menu {
	private Long id; //  菜单的编号（自增长）
	
	private String name;// 菜单的名字
	
	private String url;// 跳转的地址
	
	private String icon;// 菜单的图标
	
	// 自关联  多对一
	private Menu parent_id;
	
	// 一对多 不配置代映射文件，不用持久化到数据库
	private List<Menu> children=new ArrayList<Menu>();
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public Menu getParent_id() {
		return parent_id;
	}
	public void setParent_id(Menu parent_id) {
		this.parent_id = parent_id;
	}
	public List<Menu> getChildren() {
		return children;
	}
	public void setChildren(List<Menu> children) {
		this.children = children;
	}
	@Override
	public String toString() {
		return "Menu [id=" + id + ", name=" + name + ", url=" + url + ", icon=" + icon + "]";
	}	
}

